import React, { Component } from 'react'
import { Swiper } from 'antd-mobile'
import '../../assets/css/home/k-banner.less'
import img1 from '../../assets/images/banner1.png'
import img2 from '../../assets/images/banner2.png'
import img3 from '../../assets/images/banner3.png'
export default class Kbanner extends Component {
  state = {
    imgs: [img1, img2, img3]
  }
  handleItem = (e) => {
    console.log(e)
  }
  render() {
    return (
      <div className='k-banner'>
        <Swiper loop autoplayInterval={5000} autoplay>
          {this.state.imgs.map((e, i) => {
            return (
              <Swiper.Item key={i} onClick={this.handleItem}>
                <img src={e} alt="" />
              </Swiper.Item>
            )
          })}
        </Swiper>
      </div>
    )
  }
}
